package com.lirh.multiple.demo.config;

import com.lirh.multiple.demo.filter.Myfilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class FilterConfig {
    @Bean
    public FilterRegistrationBean registFilter(){
        FilterRegistrationBean<Myfilter> registrationBean = new FilterRegistrationBean<>();
        registrationBean.setFilter(new Myfilter());
        registrationBean.addUrlPatterns("/down/*");
        registrationBean.setOrder(1);
        return  registrationBean;

    }
}
